<?php
class SPDO
{
	static private $instancePDO;
	
	public static function pdo()
	{
		if(!self::$instancePDO)
		{
			self::$instancePDO = new PDO('mysql:host=juliendonuts.no-ip.org; dbname=domotiqueFoyer', 'projetTER', 'terdomo');
			self::$instancePDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
		}
		
		return self::$instancePDO;
	}
}
?>
